package com.yx.sys.controller;

import com.yx.common.vo.Result;
import com.yx.sys.entity.Post;
import com.yx.sys.entity.Tags;
import com.yx.sys.service.IPostService;
import com.yx.sys.service.ITagsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 标签 前端控制器
 * </p>
 *
 * @author yx
 * @since 2023-02-14
 */
@RestController
@RequestMapping("/tags")
public class TagsController {
    @Autowired
    private ITagsService iTagsService;

    @GetMapping("/all")
    public Result<List<Tags>> getAllPost(){
        List<Tags> list = iTagsService.list();
        return Result.success(list,"查询所有标签信息成功");
    }

//    根据标签模糊查询
}
